package com.hzk.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * @author zhoubin
 * @since 1.0.0
 */
@Service
@Slf4j
public class MQSender {
  @Autowired
  private RabbitTemplate rabbitTemplate;
  public void  sendsecKillMessage(String message) {
   log.info("发送消息：" + message);
   rabbitTemplate.convertAndSend("seckillExchange", "seckill.msg", message);
  }
}
